home *** CD-ROM | disk | FTP | other *** search
/ C!T ROM 3 / ct-rom iiib.zip / ct-rom iiib / WINDOWS / UTILITY / DESKTOP / CMAP / MAIN.H < prev    next >
C/C++ Source or Header  |  1994-05-08  |  1KB  |  51 lines

  1. /*
  2. This is a screen saver which uses colormap animation, a simple technique
  3. to achieve seemingly complicated motion.  The entire source of this
  4. program is provided for your convenience.  If you find it useful, I'll
  5. appreciate if you'll send me $10.  Send the check to:
  6.  
  7. CMAP registration
  8. c/o: Sin-Yaw Wang
  9. 5878 W. Walbrook Dr.
  10. San Jose, CA 95129
  11.  
  12. You can also contact me at sinyaw@netcom.com.
  13.  
  14. */
  15. #ifndef __main_H__
  16. #define __main_H__
  17.  
  18. #include "cscrnsvr.h"
  19.  
  20. class CMainWindow : public CScreenSaverWindow
  21. {
  22.     const UINT timerid;
  23.     const UINT speed;
  24.     const double PI;            /* pi */
  25.     const double INIT_PHASE;    /* seed to generate the smooth cmap */
  26.     CPalette *cmap;                /* colormap, or palette */
  27.     LOGPALETTE *entry;            /* colormap entries */
  28.     PALETTEENTRY *animate;        /* a copy of cmap to animate with */
  29.     int cmap_size;                /* size of the cmap */
  30. public:
  31.     CMainWindow();
  32.     ~CMainWindow();
  33.  
  34.     afx_msg void OnTimer(UINT);
  35.     afx_msg BOOL OnEraseBkgnd(CDC *);
  36.     afx_msg int OnCreate(LPCREATESTRUCT);
  37.     DECLARE_MESSAGE_MAP()
  38. };
  39.  
  40. class CTheApp : public CWinApp
  41. {
  42. public:
  43.     BOOL InitInstance();
  44. };
  45.  
  46.  
  47. #endif // __main_H__
  48.  
  49.  
  50.  
  51.